<template>
    <div class="appraise">
        <div>订单评价</div>
        <div style="display: flex;">
            <div class="the" @click="$router.push('/commodity')">
                <div style="font-size: 28px; font-weight: 700;">{{ data[0].freight }}</div>
                <div style="color: #02aff4; font-size: 18px; font-weight: 700;">{{ data[0].bank }}</div>
                <div style="margin-top: 20px; color: #fbdc9f;font-size: 15px; font-weight: 400;">
                    <span>参考利率</span>
                    {{ data[0].rate }}
                </div>
                <div style="display: flex;">
                    <div>
                        <div style="margin-top: 8px;  font-size: 15px; font-weight: 400;">
                            <span>融资期限: </span>
                            {{ data[0].deadline }}
                        </div>
                        <div style="margin-top: 8px;  font-size: 15px; font-weight: 400;">
                            <span>融资额度： </span>
                            {{ data[0].money }}
                        </div>
                    </div>
                    <div style="margin-left: 54px;">
                        <div style="margin-top: 8px;  font-size: 15px; font-weight: 400;">
                            <span>担保方式: </span>
                            {{ data[0].good }}
                        </div>
                        <div style="margin-top: 8px;  font-size: 15px; font-weight: 400;">
                            <span>融资主题：</span>
                            {{ data[0].country }}
                        </div>
                    </div>
                </div>
            </div>
            <!-- 左边 -->
            <div class="wire"></div>
            <div style="margin-top: 40px;">
                <div style="display: flex;">
                    <div style="margin-right: 8px; color: #acadaf; ">商品评分</div>
                    <el-rate v-model="value" show-text :texts="arr">
                    </el-rate>
                </div>
                <div style="display: flex; margin-top: 50px;">
                    <div style="color: #acadaf; margin-right: 8px;">评价晒单</div>
                    <div>
                        <el-input type="textarea" :rows="10" style="width: 510px;">
                        </el-input>
                    </div>
                </div>
                <div style="display: flex;margin-top: 20px;">
                    <div style="color: #acadaf; margin-left: 30px; margin-right: 8px;">晒图</div>
                    <div>
                        <el-upload action="#" list-type="picture-card" :auto-upload="false">
                            <i slot="default" class="el-icon-plus"></i>
                        </el-upload>
                    </div>
                </div>
                <div style="display: flex; margin-top: 20px; margin-left: 40px;">
                    <div style="margin-right: 10px;">
                        <el-button>发表</el-button>
                    </div>
                    <div style="margin-left: 15px; margin-top: 8px;">
                        <el-checkbox>匿名</el-checkbox>
                    </div>
                </div>
            </div>
            <!-- 右边 -->
        </div>

    </div>
</template>

<script>
export default {
    props: {
        list: {
            type: Array,
            default: 'default value',
            required: true,
        }
    },
    data() {
        return {
            data: null,
            value: 5,//控制评分几颗星
            arr: ["1分", "2分", "3分", "4分", "5分"]
        }
    },
    created() {
        this.deconstruction()
    },
    methods: {
        deconstruction() {
            this.data = { ...this.list }
            console.log(this.data, '数据结构');
            // console.log(this.data[0].freight
            //     , '数据结构');
        }
    }
}
</script>

<style lang="less" scoped>
.appraise {
    width: 1005px;
    height: 591px;

    // background-color: antiquewhite;
    .the {
        width: 341px;
        height: 222px;
        margin-top: 100px;
        cursor: pointer;
        // background-color: beige;
    }

    .wire {
        width: 1px;
        height: 530px;
        background-color: #f5f5f5;
        margin-left: 30px;
        margin-right: 40px;


    }
}

/deep/.el-rate {
    position: relative;
}

/deep/.el-rate__text {
    position: absolute;
    top: 30px;
    left: 0px;
}

/deep/.el-button {
    border-radius: 10%;
    color: #fff;
    background-color: #4d79ff;
    background-image: linear-gradient(160deg, #4d79ff 0%, #4d94ff 100%);
}
</style>